package com.atguigu.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.List;

//用户
@Entity
@Table(name = "t_user")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    private Integer id ;
    private String uname ;
    private String pwd ;
    private String email ;
    private Integer role ;  //0:普通用户  1:管理员
    private List<OrderBean> orderBeanList ; //一个用户可以拥有多个订单
    private UserVO userVO;
    private Cart cart = new Cart(); //一个用户拥有一个购物车
}
